<template>
  <r-multi-form ref="multi-form" style="width: 80%; margin-left: 10%" :columns="tableColumns" :submit="tableSubmit" :form-props="formProps" @multiSubmit="onSubmit"></r-multi-form>
</template>

<script>
import tableColumns from './tableColumn'
import formColumns from './formColumn'
export default {
  data() {
    return {
      tableColumns,
      tableSubmit: { name: '提交', type: 'success' },
      formColumns,
      formSubmit: { name: '暂存', type: 'primary' }
    }
  },
  computed: {
    formProps() {
      return { columns: this.formColumns, submit: this.formSubmit }
    }
  },
  methods: {
    onSubmit(tableData) {
      console.log(tableData)
      this.$message({
        message: 'success',
        type: 'success'
      })
    }
  }
}
</script>
